package com.codedef.util;

import java.util.HashMap;
import java.util.Map;

/**
 * @author 孙宏宇
 * @date 2021/3/4 16:53
 */
class PathNode {

    private Map<String, PathNode> map = new HashMap<String, PathNode>();

    public PathNode get(String s) {
        return map.get(s);
    }

    public void addChild(String s) {
        if (!map.containsKey(s))
            map.put(s, new PathNode());
    }

    public boolean containsKey(String s) {
        return map.containsKey(s);
    }

    @Override
    public String toString() {
        return "{" +
                "\"map\": " + map +
                '}';
    }
}